import axios from 'axios';

import { CardQuery } from '../models/CardList';
import { CardTypeQuery } from '../models/CardTypeList';

export const getCardType = (query: CardTypeQuery) => axios.get('/api/v1/card/type', { params: query.params });

// 首页热门
export const getCardList = (body: CardQuery) => axios.post('/api/v1/card/List', body.list);

export const getcardListAll = (body: CardQuery) => axios.post('/api/v1/card/List', body.all);

// 搜索
export const searchCardByName = (body: CardQuery) => axios.post('/api/v1/card/List', body.search);

// 分类
export const getCardListByType = (body: CardQuery) => axios.post('/api/v1/card/List', body.filter);

export const getSwiperList = () => axios.get('/api/v1/platform/banner');
